#include <assert.h>
#include "gisao_factory.h"
#include "gisao_stub4web.h"
#include "gisao_stub4app.h"
//#include "gisao.h"

using namespace erp::gis::ao;

bool CGisAoFactory::s_GisAoInit = false;

IGisAo* CGisAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CGisAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_GisAoInit)
        {
            int iRetCode = CGisAo::Initialize();
            assert(iRetCode == 0);
            s_GisAoInit = true;
        }   	
        return (new CGisAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IGisAoAsyc* CGisAoFactory::GetAsycObject()
{
	return (new CGisAoStub4App);
}
